import {
  handlerGetUrlParams
} from '@/utils/dealUrlParams.js'
import request from '@/utils/request'

export function getDataStatisticsList(param) {
  const url = handlerGetUrlParams('/bus/statcms/list', param)
  return request({
    url,
    method: 'GET',
  })
}

export function deleteDataStatistics(ids) {
  return request({
    url: `/bus/statcms/${ids}`,
    method: 'DELETE',
  })
}

export function editDataStatisticsStatus(data) {
  return request({
    url: `/bus/statcms/down`,
    method: 'PUT',
    data
  })
}

export function getDataStatisticsDetail(ids) {
  return request({
    url: `/bus/statcms/${ids}`,
    method: 'GET',
  })
}

export function editDataStatistics(data, param) {
  const url = handlerGetUrlParams('/bus/statcms', param)
  return request({
    url,
    method: 'PUT',
    data
  })
}

export function issueDataStatistics(data) {
  return request({
    url: `/bus/statcms`,
    method: 'POST',
    data
  })
}

export function getFrontDataStatisticsList(param) {
  const url = handlerGetUrlParams('/bus/statcms/getInfo', param)
  return request({
    url,
    method: 'GET',
  })
}